package org.springframework.prospring.ticket.service;

import org.springframework.prospring.ticket.domain.location.Region;
import org.springframework.prospring.ticket.domain.Club;

import java.util.Collection;
import java.util.Date;

/**
 * Represents a reservation field request. This is a request to reserve a field for
 * a specific date and hours.
 */
public class ReservationFieldRequest {

    /**
     * The succes view is de forward page used into the view.
     */
    String successView;
    Collection<Region> regions;
    Collection<Club> clubs;

    Long regionId;
    Long sportId;
    Long clubId;
    Long fieldId;
    Date reservationDate;
    String startHour;
    String endHour;


    /**
     * Empty constructor to support javabeans spec.
     */
    public ReservationFieldRequest() {
    }

    /**
     * Constructs a new reservation request.
     * @param regions The regions to choose the field's location.
     */
    //Collection Regions
    public ReservationFieldRequest(Collection<Region> regions) {

        this.regions = regions;
    }

    //Collection Clubs
    /*public ReservationFieldRequest(Collection<Club> clubs) {

        this.clubs = clubs;
    }*/

    public String getSuccessView() {
        return successView;
    }

    public void setSuccessView(String successView) {
        this.successView = successView;
    }

    public Collection<Region> getRegions() {
        return regions;
    }

    public void setRegions(Collection<Region> regions) {
        this.regions = regions;
    }

    public Long getRegionId() {
        return regionId;
    }

    public void setRegionId(Long regionId) {
        this.regionId = regionId;
    }

    public Long getSportId() {
        return sportId;
    }

    public void setSportId(Long sportId) {
        this.sportId = sportId;
    }

    public Long getClubId() {
        return clubId;
    }

    public void setClubId(Long clubId) {
        this.clubId = clubId;
    }

    public Long getFieldId() {
        return fieldId;
    }

    public void setFieldId(Long fieldId) {
        this.fieldId = fieldId;
    }

    public Date getReservationDate() {
        return reservationDate;
    }

    public void setReservationDate(Date reservationDate) {
        this.reservationDate = reservationDate;
    }

    public String getStartHour() {
        return startHour;
    }

    public void setStartHour(String startHour) {
        this.startHour = startHour;
    }

    public String getEndHour() {
        return endHour;
    }

    public void setEndHour(String endHour) {
        this.endHour = endHour;
    }

    public String toString() {
        String value = "successView="+successView;
        value += ", regions "+(regions != null ? "size="+regions.size() : "null") ;
        value += ", regionId="+regionId;
        value += ", clubId="+clubId;
        value += ", reservationDate="+reservationDate;

        return value;
    }
}

